﻿
namespace IInject.Internal
{
	///<summary>
	/// Provides a base class for object that need reference to the
	/// <see cref="Container"/> and that have resources to dispose of.
	///</summary>
	public abstract class DisposableContainerMember : DisposableObject
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="DisposableContainerMember"/> class.
		/// </summary>
		/// <param name="container">The current <see cref="IContainer"/>.</param>
		protected DisposableContainerMember(IContainer container)
		{
			Container = container;
		}

		/// <summary>
		/// The current <see cref="IContainer"/>.
		/// </summary>
		protected IContainer Container { get; private set; }
	}
}
